<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .a {
      width: 100px;
      height: 100px;
      background-color: pink;
    }
  </style>
  <script src="../js/jquery.min.js"></script>
  <script>
    $(() => {
      $('.box').click(function (e) {
        if (e.target.tagName === 'P') {
          console.log('来米')
        }
      })
    })
  </script>
</head>

<body>
  <div class="box">
    <p>p</p>
    <div>div</div>
    <span>span</span>
    <h1>h1</h1>
  </div>
</body>

</html>